package com.marktotop.controller;

import com.marktotop.entity.Admin;
import com.marktotop.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * AdminController
 *
 * @author WXLD
 * @Data 2021/6/29
 * @Since 1.0
 */
@Controller
@RequestMapping("/admin")
public class AdminController {

    @Autowired
    private AdminService adminService;

    @RequestMapping("/queryAll")
    @ResponseBody
    public List<Admin> queryAllAdmin(){
        return adminService.getAllAdmin();
    }

}
